
<div class="box_width_common">
    <div id="col_left" class="w670">
        <div id="cate_club" class="box_width_common">
            <div class="box_content_common">
                <div id="container_content">
                    <ul id="tabs_top">
                        <li class="active_tab_top">
                            <a href="#" class="txt_gray">Vòng bảng</a>
                        </li>
                        <li>
                            <a href="#" class="txt_gray">Đấu loại trực tiếp</a>
                        </li>
                    </ul> 
                    
                    <?php 
                    if(!empty ($this->fixture)) 
                    {
                        foreach($this->fixture as $round => $data)
                        {
                        ?>
                        <div class="vongbang_dau">
                            <table>
                                <tr class="row_top_tbl">
                                    <td class="w150"><p class="top_name_doibong"><span>Bảng</span><span class="name_bang"><?php echo strtoupper(str_replace('group-', '', $round)); ?></span></p></td>
                                    <td><span>Điểm</span></td>
                                    <td class="w140">
                                        <span class="w30">Trận</span>
                                        <span class="w30">Thắng</span>
                                        <span class="w30">Hòa</span>
                                        <span class="w30">Thua</span>
                                    </td>
                                    <td><span>H.Số</span></td>
                                </tr>
                                <?php 
                                $tableRanking = $data['Ranking'];
                                $i = 1;
                                if (!empty($tableRanking))
                                {                                    
                                    foreach ($tableRanking as $ranking) {
                                    ?>
                                    <tr class="bg_row_le">
                                        <td class="name_doibong">
                                            <span><?php echo $i; ?></span><span><img src="images/icons/icon_anh.gif" alt="" title="" /></span><span><?php echo $ranking['Name']; ?></span>
                                        </td>
                                        <td><b><?php echo $ranking['Point'];?></b></td>
                                        <td>
                                            <span class="w30"><?php echo $ranking['NumMatch'];?></span>
                                            <span class="w30"><?php echo $ranking['Won'];?></span>
                                            <span class="w30"><?php echo $ranking['Drawn'];?></span>
                                            <span class="w30"><?php echo $ranking['Lost'];?></span>
                                        </td>
                                        <td><span><?php echo $ranking['GoalDiffenrence'];?></span></td>
                                    </tr>
                                    <?php 
                                    $i++;
                                    } 
                                }?>
                            </table>
                            <div class="btn_btn_anlichthidau_left">
                                <a href="javascript:;" class="btn_anlichthidau" rel="bảng <?php echo strtoupper(str_replace('group-', '', $round)); ?>">
                                    <span>Ẩn lịch thi đấu Bảng <?php echo strtoupper(str_replace('group-', '', $round)); ?></span>
                                </a>
                            </div>
                            <div class="clear"></div>
                            <ul class="list_capdau box_width_common">
                                <?php 
                                    $arrMatches = $data['Matches'];
                                     foreach($arrMatches as $match){

                                ?>
                                <li>
                                    <div class="txt_trandau">
                                        <div class="box_width_common">
                                            <div class="left">
                                                <?php
                                                $dayOfWeek = date('N', $match['DatetimeHappen']) + 1;
                                                if ($dayOfWeek == 8)
                                                    echo 'Chủ nhật';
                                                else
                                                    echo "Thứ $dayOfWeek";
                                                echo ', ', date('d/m/Y', $match['DatetimeHappen']);
                                                ?>
                                            </div>
                                        </div>
                                        <div class="clear">&nbsp;</div>
                                    </div>
                                    <div class="time w80 left txt_gray txt_right">03:00</div>
                                    <div class="capdau">
                                        <div class="w230 left">
                                            <img class="right" alt="<?php echo $match['TeamName1'] ?>" src="<?php echo $this->Imageurl($match['TeamLogo1'], $this->imageSize['size6']); ?>" onerror="this.src='<?php echo $this->Imageurl('notfound.jpg', $this->imageSize['size6']); ?>'" />
                                            <span class="right">
                                                <a class="txt_black_hover_blue" href="#">
                                                <?php echo $match['TeamName1']; ?></a>
                                            </span>
                                        </div>
                                        <div class="w50 left txt_center txt_gray"> v </div>
                                        <div class="w230 left">
                                            <img class="left" alt="<?php echo $match['TeamName2'] ?>" src="<?php echo $this->Imageurl($match['TeamLogo2'], $this->imageSize['size6']); ?>" onerror="this.src='<?php echo $this->Imageurl('notfound.jpg', $this->imageSize['size6']); ?>'" />
                                            <span class="left">
                                                <a class="txt_black_hover_blue" href="#">
                                                <?php echo $match['TeamName2']; ?>
                                                </a>
                                            </span>
                                        </div>
                                    </div>
                                    <div class="box_width_common txt_link_thongtin_capdau">
                                        <p> <a class="txt_gray" href="#">Thông tin trước trận đấu</a> &nbsp; | &nbsp; <a class="txt_gray" href="#">Trực tiếp</a> &nbsp; | &nbsp; <a class="txt_gray" href="#">Đánh giá cầu thủ</a> &nbsp; | &nbsp; <a class="txt_gray" href="#">Video</a> </p>
                                    </div>
                                </li>
                                <?php } ?>
                            </ul>
                        </div>
                        <?php 
                        }
                     }
                    ?>
                    
                    
                </div>
                </div>
            </div> 
        </div>

        <script language="javascript" type="text/javascript" src="<?php echo $this->config['js']; ?>/euro2012/js/lib/jquery.min.js.js"></script>
        <script language="javascript" type="text/javascript" src="<?php echo $this->config['js']; ?>/euro2012/js/common.js"></script>
        <script language="javascript" type="text/javascript" src="<?php echo $this->config['js']; ?>/euro2012/js/slides.min.jquery.js"></script>
        <script language="javascript" type="text/javascript">
            $(function(){
                $('.match_item').slides({
                    preload: true,
                    generateNextPrev: true
                });
            });
        </script>
        <script language="javascript" type="text/javascript">
            $(document).ready(function() {
                $('#cate_club a.btn_anlichthidau').click(
                function(){
                   
                    var contentCapdau = $(this).parent().parent().find('.list_capdau');
                    var bangdau = $(this).attr('rel');
                    console.log(bangdau);
                    if(contentCapdau.css('display') == 'block'){
                        $('#cate_club .list_capdau').slideUp();
                        $('#cate_club a.btn_anlichthidau span').removeClass('active').text('Xem lịch thi đấu ' + bangdau);
                    }
                    if(contentCapdau.css('display') == 'none'){
                        $('#cate_club a.btn_anlichthidau span').removeClass('active').text('Xem lịch thi đấu ' + bangdau);
                        $('#cate_club .list_capdau').slideUp();
                        contentCapdau.slideDown();
                        $(this).find('span').addClass('active').text('Ẩn lịch thi đấu ' + bangdau);
					
                    }
                }
            )
            });
        </script>
    </div></div>
    
    
   
    
    
    
    <div class="box_width_common">
    <div id="col_left" class="w670">
        <!-- InstanceBeginEditable name="col left" -->
        <div id="cate_club" class="box_width_common">
            <div class="box_content_common">
                <div id="container_content">
                    <ul id="tabs_top">
                        <li class="active_tab_top">
                            <a href="#" class="txt_gray">Vòng bảng</a>
                        </li>
                        <li>
                            <a href="#" class="txt_gray">Đâu loại trức tiếp</a>
                        </li>
                    </ul>
                     <?php 
                    if(!empty ($this->arrTeam)) 
                    {
                        
                        foreach($this->arrTeam as $team => $data)
                        {
                            
                            $name = explode(' ', $data['Name']);
                        ?>
                        <div class="vongbang_dau">
                            <table>
                                <tr class="row_top_tbl">
                                    <td class="w150"><p class="top_name_doibong"><span>Bang</span><span class="name_bang"><?php echo $name['1']; ?></span></p></td>
                                    <td><span>Ä�iá»ƒm</span></td>
                                    <td class="w140">
                                        <span class="w30">Trận</span>
                                        <span class="w30">Thắng</span>
                                        <span class="w30">Hòa</span>
                                        <span class="w30">Thua</span>
                                    </td>
                                    <td><span>H.Số</span></td>
                                </tr>
                                <?php 
                                $tableRanking = $data['Team'];
                                $i = 1;
                                if (!empty($tableRanking))
                                {                                    
                                    foreach ($tableRanking as $ranking) {                                        
                                    ?>
                                        <tr class="bg_row_le">
                                            <td class="name_doibong">
                                                <span><?php echo $i; ?></span>
                                                <span>
                                                    <img src="images/icons/icon_anh.gif" alt="" title="" />
                                                </span>
                                                <span><?php echo $ranking['name']; ?></span>
                                            </td>
                                            <td><b><?php echo $ranking['point']; ?></b></td>
                                            <td>
                                                <span class="w30"><?php echo $ranking['won'] + $ranking['drawn'] + $ranking['lost']; ?></span>
                                                <span class="w30"><?php echo $ranking['won']; ?></span>
                                                <span class="w30"><?php echo $ranking['drawn']; ?></span>
                                                <span class="w30"><?php echo $ranking['lost']; ?></span>
                                            </td>
                                            <td><span>7/2</span></td>
                                        </tr>
                                <?php 
                                    }
                                }
                                ?>
                            </table>
                            
                             <div class="btn_btn_anlichthidau_left">
                                <a href="javascript:;" class="btn_anlichthidau" rel="báº£ng <?php echo strtoupper(str_replace('group-', '', $round)); ?>">
                                    <span>An lich thi dau Bang <?php echo strtoupper(str_replace('group-', '', $round)); ?></span>
                                </a>
                            </div>
                            <div class="clear"></div>
                            <ul class="list_capdau box_width_common">
                                <?php 
                                 echo "<pre>";print_r($this->arrcapdau);
                                  
                                     foreach($this->arrcapdau as $matchs)
                                     {
                                         foreach($matchs as $match)
                                        {
                                ?>
                                <li>
                                    <div class="txt_trandau">
                                        <div class="box_width_common">
                                            <div class="left">
                                                <?php
                                                $dayOfWeek = date('N', $match['DatetimeHappen']) + 1;
                                                if ($dayOfWeek == 8)
                                                    echo 'Chủ nhật';
                                                else
                                                    echo "Thứ $dayOfWeek";
                                                echo ', ', date('d/m/Y', $match['DatetimeHappen']);
                                                ?>
                                            </div>
                                        </div>
                                        <div class="clear">&nbsp;</div>
                                    </div>
                                    <div class="time w80 left txt_gray txt_right">03:00</div>
                                    <div class="capdau">
                                        <div class="w230 left">
                                            <img class="right" alt="<?php echo $match['name1'] ?>" src="<?php echo $this->Imageurl($match['TeamLogo1'], $this->imageSize['size6']); ?>" onerror="this.src='<?php echo $this->Imageurl('notfound.jpg', $this->imageSize['size6']); ?>'" />
                                            <span class="right">
                                                <a class="txt_black_hover_blue" href="#">
                                                <?php echo $match['name1']; ?></a>
                                            </span>
                                        </div>
                                        <div class="w50 left txt_center txt_gray"> v </div>
                                        <div class="w230 left">
                                            <img class="left" alt="<?php echo $match['name2'] ?>" src="<?php echo $this->Imageurl($match['TeamLogo2'], $this->imageSize['size6']); ?>" onerror="this.src='<?php echo $this->Imageurl('notfound.jpg', $this->imageSize['size6']); ?>'" />
                                            <span class="left">
                                                <a class="txt_black_hover_blue" href="#">
                                                <?php echo $match['name2']; ?>
                                                </a>
                                            </span>
                                        </div>
                                    </div>
                                    <div class="box_width_common txt_link_thongtin_capdau">
                                        <p> <a class="txt_gray" href="#">Thông tin trước trận đấu</a> &nbsp; | &nbsp; <a class="txt_gray" href="#">Trực tiếp</a> &nbsp; | &nbsp; <a class="txt_gray" href="#">Đánh giá cầu thủ</a> &nbsp; | &nbsp; <a class="txt_gray" href="#">Video</a> </p>
                                    </div>
                                </li>
                                <?php                                 
                                }  
                                     }
                                ?>
                            </ul>
                        </div>
                    <?php 
                        } //end foreach
                    } // end if
                    ?>
                    
            </div>
        </div>

        <!-- InstanceEndEditable -->                 
    </div>
</div>
    <div id="col_right" class="w300">
        <!-- InstanceBeginEditable name="col right" -->
        <div class="banner_300x250 left w300"> <a href="#" title="ads"><img src="images/ads/ads_300x250.jpg" alt="" /></a> </div>


        <div id="box_hautruong" class="box_col_300 box_width_common left">
            <div class="txt_title_box dot_bottom">BÃªn lá»�</div>
            <div class="content_news">
                <ul class="list_news_hautruong">
                    <li class="start">
                        <h4><a href="#" class="txt_black_hover_blue">Arsenal bá»‹ Ä‘Ã¡ vÄƒng khá»�i Cup FA</a></h4>
                        <p>Thi Ä‘áº¥u rá»�i ráº¡c vÃ  thiáº¿u quyáº¿t tÃ¢m, Arsenal Ä‘Ã£ pháº£i nháº­n tráº­n thua 0-2 báº½ bÃ ng trÃªn sÃ¢n cá»§a Sunderland á»Ÿ vÃ²ng 5 Cup FA tá»‘i qua.</p>
                    </li>
                    <li>
                        <h4><a href="#" class="txt_black_hover_blue">Arsenal bá»‹ Ä‘Ã¡ vÄƒng khá»�i Cup FA</a></h4>
                        <p>Thi Ä‘áº¥u rá»�i ráº¡c vÃ  thiáº¿u quyáº¿t tÃ¢m, Arsenal Ä‘Ã£ pháº£i nháº­n tráº­n thua 0-2 báº½ bÃ ng trÃªn sÃ¢n cá»§a Sunderland á»Ÿ vÃ²ng 5 Cup FA tá»‘i qua.</p>
                    </li>
                    <li>
                        <h4><a href="#" class="txt_black_hover_blue">Arsenal bá»‹ Ä‘Ã¡ vÄƒng khá»�i Cup FA</a></h4>
                        <p>Thi Ä‘áº¥u rá»�i ráº¡c vÃ  thiáº¿u quyáº¿t tÃ¢m, Arsenal Ä‘Ã£ pháº£i nháº­n tráº­n thua 0-2 báº½ bÃ ng trÃªn sÃ¢n cá»§a Sunderland á»Ÿ vÃ²ng 5 Cup FA tá»‘i qua.</p>
                    </li>
                    <li>
                        <h4><a href="#" class="txt_black_hover_blue">Arsenal bá»‹ Ä‘Ã¡ vÄƒng khá»�i Cup FA</a></h4>
                        <p>Thi Ä‘áº¥u rá»�i ráº¡c vÃ  thiáº¿u quyáº¿t tÃ¢m, Arsenal Ä‘Ã£ pháº£i nháº­n tráº­n thua 0-2 báº½ bÃ ng trÃªn sÃ¢n cá»§a Sunderland á»Ÿ vÃ²ng 5 Cup FA tá»‘i qua.</p>
                    </li>
                </ul>
                <div class="txt_view_more"><a href="#" class="txt_gray">Xem thÃªm</a> <span class="icon_portal_thethao icon_view_more">&nbsp;</span></div>
                <div class="clear">&nbsp;</div>
            </div>
        </div>
        <div id="box_cauthuxs" class="box_col_300 box_width_common left">
            <div class="txt_title_box">Cáº§u thá»§ ghi nhÃ¬u bÃ n tháº¯ng nháº¥t</div>
            <div class="content_news">
                <div class="content_tab tab1" style="display:block;">
                    <table cellpadding="0" cellspacing="0" class="tb_cauthuxs">
                        <tr class="top">
                            <td class="w150">TÃªn cáº§u thá»§</td>
                            <td class="w40">Sá»‘ bÃ n</td>
                            <td class="w60">Penalties</td>
                        </tr>
                        <tr class="le">
                            <td  class="w150"><a href="#" title="cau thu name"><img src="images/graphics/img_50x50.jpg" alt="cau thu name" /></a>
                                <p><a href="#" class="txt_blue"><b>Mario Gomez</b></a></p>
                                <p class="txt_gray">Striker</p>
                                <p><a href="#" class="club_name"><b>Barcelona</b></a></p></td>
                            <td class="w40">5</td>
                            <td class="w60">3</td>
                        </tr>
                        <tr class="">
                            <td  class="w150"><a href="#" title="cau thu name"><img src="images/graphics/img_50x50.jpg" alt="cau thu name" /></a>
                                <p><a href="#" class="txt_blue"><b>Mario Gomez</b></a></p>
                                <p class="txt_gray">Striker</p>
                                <p><a href="#" class="club_name"><b>Barcelona</b></a></p></td>
                            <td class="w40">5</td>
                            <td class="w60">3</td>
                        </tr>
                        <tr class="le">
                            <td  class="w150"><a href="#" title="cau thu name"><img src="images/graphics/img_50x50.jpg" alt="cau thu name" /></a>
                                <p><a href="#" class="txt_blue"><b>Mario Gomez</b></a></p>
                                <p class="txt_gray">Striker</p>
                                <p><a href="#" class="club_name"><b>Barcelona</b></a></p></td>
                            <td class="w40">5</td>
                            <td class="w60">3</td>
                        </tr>
                        <tr class="">
                            <td  class="w150"><a href="#" title="cau thu name"><img src="images/graphics/img_50x50.jpg" alt="cau thu name" /></a>
                                <p><a href="#" class="txt_blue"><b>Mario Gomez</b></a></p>
                                <p class="txt_gray">Striker</p>
                                <p><a href="#" class="club_name"><b>Barcelona</b></a></p></td>
                            <td class="w40">5</td>
                            <td class="w60">3</td>
                        </tr>
                        <tr class="le">
                            <td  class="w150"><a href="#" title="cau thu name"><img src="images/graphics/img_50x50.jpg" alt="cau thu name" /></a>
                                <p><a href="#" class="txt_blue"><b>Mario Gomez</b></a></p>
                                <p class="txt_gray">Striker</p>
                                <p><a href="#" class="club_name"><b>Barcelona</b></a></p></td>
                            <td class="w40">5</td>
                            <td class="w60">3</td>
                        </tr>
                    </table>
                    <div class="txt_view_more"><a href="#" class="txt_gray">Xem thÃªm</a> <span class="icon_portal_thethao icon_view_more">&nbsp;</span></div>
                </div>
            </div>
        </div>

        <!-- InstanceEndEditable -->                  
    </div>
</div>

    <script language="javascript" type="text/javascript" src="<?php echo $this->config['js']; ?>/euro2012/js/lib/jquery.min.js.js"></script>
    <script language="javascript" type="text/javascript" src="<?php echo $this->config['js']; ?>/euro2012/js/common.js"></script>
    <script language="javascript" type="text/javascript" src="<?php echo $this->config['js']; ?>/euro2012/js/slides.min.jquery.js"></script>
    <script language="javascript" type="text/javascript">
        $(function(){
            $('.match_item').slides({
                preload: true,
                generateNextPrev: true
            });
        });
    </script>
   <script language="javascript" type="text/javascript">
            $(document).ready(function() {
                $('#cate_club a.btn_anlichthidau').click(
                function(){
                     
                    var contentCapdau = $(this).parent().parent().find('.list_capdau');
                    var bangdau = $(this).attr('rel');
                    console.log(bangdau);
                    if(contentCapdau.css('display') == 'block'){
                        $('#cate_club .list_capdau').slideUp();
                        $('#cate_club a.btn_anlichthidau span').removeClass('active').text('Xem lịch thi đấu ' + bangdau);
                    }
                    if(contentCapdau.css('display') == 'none'){
                        $('#cate_club a.btn_anlichthidau span').removeClass('active').text('Xem lịch thi đấu ' + bangdau);
                        $('#cate_club .list_capdau').slideUp();
                        contentCapdau.slideDown();
                        $(this).find('span').addClass('active').text('Ẩn lịch thi đấu ' + bangdau);
				
                    }
                }
            )
            })
        </script>